import wepy from 'wepy';

export default class LoginMixin extends wepy.mixin {
    data = {
        isShowLogin:false
    };
    onShow(){
    }

    isShowLoginBox(){
        this.isShowLogin = wepy.getStorageSync('login_token')?false:true;
        this.$apply();
    }

    /***验证手机号码*/
    testPhone(val){
        return /^1[34578]\d{9}$/.test(val)
    }

    /***验证验证码*/
    testCode(val){
        return /^\d{6}$/.test(val);
    }
}